const info: { name: string; age: number; address: string } = {
  name: "lyy",
  age: 18,
  address: "",
};

//  对象类型和函数类型结合使用                可选类型
type pointType = { x: number; y: number; z?: number }; //alias

function print(point: pointType) {
  console.log("x坐标", point.x);
  console.log("y坐标", point.y);
  if (point.z) {
    console.log("z坐标", point.z);
  }
}

print({ x: 2, y: 2, z: 3 });

export{}